/*
 * File: E:\Kan\ARM\Projects\Google Code\Umrichter\trunk\SimulinkModelle\slprj\ert\_sharedutils\div_s16u32.c
 *
 * Code generated for Simulink model 'Fu_RotAngObs'.
 *
 * Model version                  : 1.431
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sun Jun 02 20:26:39 2013
 */

#include "rtwtypes.h"
#include "rtw_shared_utils.h"

int16_T div_s16u32(uint32_T numerator, uint32_T denominator)
{
  int16_T quotient;
  if (denominator == 0) {
    quotient = MAX_int16_T;

    /* Divide by zero handler */
  } else {
    quotient = (int16_T)(denominator == 0 ? MAX_uint32_T : numerator /
                         denominator);
  }

  return quotient;
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
